﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HomeVideo.aspx.cs" Inherits="admin_UKNOW_SyncEvents" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/default.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--

        function Rx() 
        {
            var RexObj = {
                errMsg: "",
                isHavetitle: function (y) { RexObj.errMsg += /^[ ]+$/.test(y)  ? "视频名称不能为空\n" : ""; },
                isVideo: function (x) { RexObj.errMsg += /(.*)+\.(rmvb|avi|swf|flv)$/.test(x) ? "" : "必须为视频文件\n"; }
                }
            RexObj.isHavetitle($("#txtVideoName").val()); //判断名称是否为空
            if ($("#hidID").val()=="$") {
            RexObj.isVideo($("#upVideo").val()); //判断是否为视频文件
            }
        var fn = (RexObj.errMsg.replace("", "") != "" ? function () { alert(RexObj.errMsg); return false } : function () { return true })
        return fn();
          
            
        }
        

    //-->
    </script>
</head>
<body >
    <form id="mainForm" method="post" runat="server">
    <div>
    <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
            <tr bgcolor="#2583BC">
                <th align="left">
                    上传首页播放视频
                </th>
            </tr>
        </table>
        <table width="100%" height="400" border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
                <td height="414" align="left" valign="top" class="rightbg">
                    <table width="100%" border="0" align="center" style="border: solid 1px #99C;">
                        
                        
                        
                        <tr>
                            <td class="style4">视频名称：</td>
                            <td width="90%">
                                <asp:TextBox ID="txtVideoName" runat="server" Text=" "  Width="214px"></asp:TextBox>&nbsp&nbsp<span style="color:Red;font-size:15px">*</span>
                                <asp:HiddenField ID="hidID" value="$"  runat="server" />
                                </td>
                        </tr>
                        <tr>
                            <td class="style4">上传视频：</td>
                            <td width="90%">
                                <asp:FileUpload ID="upVideo" runat="server" Width="224px" />
                                
                                </td>
                        </tr>
                        <tr><td class="style1" height="33">视频描述：</td></tr>
                        
                        <tr>
                            <td>
                            &nbsp
                            </td>
                            <td>
                                <asp:TextBox ID="txtVideoDesp" runat="server" Height="113px" Width="497px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                        <td>
                            <asp:Button ID="btnOk" runat="server" OnClientClick=" return Rx()" Text="确 定" 
                                onclick="btnOk_Click" /></td>
                        <td>
                            <%--<asp:Button ID="btnCancel" runat="server" Text="返 回" 
                                   OnClientClick="window.location='columnExplain.aspx'" /></td>--%>
                                   <input type="button" value="返回" onclick="window.history.go(-1)" /></td>
                        </tr>
                        
                    </table>
                </td>
            </tr>
        </table>    
    </div>
    </form>
</body>
</html>
